import BaseComponent from "http://component.119safe.cn/component/base.js";

new class Plan_List extends BaseComponent
{
	/*
	 * pid			计划id
	 * refparam		查询参数(翻页、所属楼盘、……)
	 * name			计划名称
	 * deadline		期限
	 * dealer		负责人
	 * finished		已完成任务数
	 * unfinished	未完成任务数
	 */
	Properties = { "pid": null, "refparam": "", "project": null, "name": null, "deadline": null, "dealer": null, "finished": null, "unfinished": null};

	InnerContainer = "span[content]";

	render() { super.render(this.constructor.name); }

	Content = `
<div class='col-xs-12' onclick='location.href="./plan.aspx?id={pid}&refparam={refparam}"'>
	<div class='col-xs-12 col-md-7'>
		<div class='col-xs-7'>
			<div>楼盘：{project}</div>
			<div style='overflow:hidden; text-overflow:ellipsis;white-space:nowrap'>名称：{name}</div>
		</div>
		<div class='col-xs-5'>
			<div>期限：{deadline}</div>
			<div>负责人：{dealer}</div>
		</div>
	</div>

	<div class='col-xs-12 col-md-5' style='color:brown'>
		<div class='col-xs-7 col-md-12'>完成{finished}条</div>
		<div class='col-xs-5 col-md-12'>未成{unfinished}条</div>
	</div>
	<div class='col-xs-12'>
		<div class='col-xs-12' style='color:green;overflow:hidden;text-overflow:ellipsis;max-height:40px'>内容：<span content>{content}</span></div>
	</div>
</div>
`;
}().render();
